/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.factory.server.bo;

import java.math.BigInteger;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 *
 * @author milos
 */
@Entity
@Table(name = "fibonacci")
public class Fibonacci extends AbstractBusinessObject{

    @Basic(optional = false)
    @Column(name = "index")
    private BigInteger index;
    @Basic(optional = false)
    @Column(name = "value", columnDefinition="text")
    private String value;

    public Fibonacci() {
    }

    public Fibonacci(BigInteger index) {
        this.index = index;
    }

    public Fibonacci(BigInteger index, String value) {
        this.index = index;
        this.value = value;
    }

    public BigInteger getIndex() {
        return index;
    }

    public void setIndex(BigInteger index) {
        this.index = index;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (index != null ? index.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Fibonacci)) {
            return false;
        }
        Fibonacci other = (Fibonacci) object;
        if ((this.index == null && other.index != null) || (this.index != null && !this.index.equals(other.index))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.factory.server.bo.Fibonacci[ index=" + index + " ]";
    }
    
}
